package se.webbzon.boltzmann.editor.component.sequence.factory;

import se.webbzon.boltzmann.factory.AbstractFactory;
import se.webbzon.boltzmann.game.sequence.builder.AbstractSequenceRow;
import se.webbzon.boltzmann.game.sequence.builder.SequenceBuilder;

public abstract class AbstractSequenceRowFactory extends AbstractFactory<String,AbstractSequenceRow,SequenceBuilder> implements Comparable<AbstractSequenceRowFactory> {

	// The name of the sequence row factory
	private final String factoryName;
	
	/*============================================================
	Constructors
	============================================================*/
	
	public AbstractSequenceRowFactory(String factoryName) {
		this.factoryName = factoryName;
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	@Override public String getKey() {
		return factoryName;
	}

	@Override public int compareTo(AbstractSequenceRowFactory other) {
		return factoryName.compareTo(other.factoryName);
	}
	
	@Override public String toString() {
		return factoryName;
	}

}
